<template>
  <div class="question-types">
    <div class="itemall">
      <div class="item" @click="sendType(3)">
        <img src="../../../assets/test/xz.png" class="pic" />
        <div>选择题</div>
      </div>
      <div class="item" @click="sendType(1)">
        <img src="../../../assets/test/pd.png" class="pic" />
        <div>判断题</div>
      </div>
      <div class="item" @click="sendType(4)">
        <img src="../../../assets/test/wd.png" class="pic" />
        <div>问答题</div>
      </div>
      <div class="item" @click="sendType(2)">
        <img src="../../../assets/test/tk.png" class="pic" />
        <div>填空题</div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  methods: {
    sendType(val) {
      this.$emit("select", val);
    }
  }
};
</script>

<style lang="scss" scoped>
.question-types {
  width: 300px;
  padding: 20px;
  border-right: 1px solid #E2E7F5;
}

.itemall {
  display: flex;
  flex-direction: column;
  gap: 15px;
  
  .item {
    width: 100%;
    height: 80px;
    background: #f6f8fc;
    border-radius: 8px;
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
    flex-direction: row;
    font-weight: 400;
    font-size: 16px;
    cursor: pointer;
    
    &:hover {
      background: #eef1f6;
    }

    .pic {
      width: 40px;
      height: 40px;
    }

    color: #323232;
    line-height: 22px;
    text-align: center;
    font-style: normal;
  }
}
</style>
